// 启动 npm nodemon xxx.js  自动运行修改的文件
// Reflect 对象
const obj = {
  name: 'joe',
  age: 20,
}

const presonProxy = new Proxy(obj, {
  get(target, key) {
    console.log(target, key)
    return Reflect.get(target, key)
  },
})
console.log(presonProxy.name)

console.log('name' in obj)
console.log(delete obj['age'])
console.log(Object.keys(obj))

console.log(Reflect.has(obj, 'name'))
console.log(Reflect.deleteProperty(obj, 'age'))
console.log(Reflect.ownKeys(obj))
